//
//  DetailCell1.m
//  BDuan
//
//  Created by dllo on 16/1/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DetailCell1.h"

@implementation DetailCell1
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}
- (void)createSubViews{
    self.tuijian = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)];
    self.tuijian.text = @"推荐";
    self.tuijian.textColor = [UIColor redColor];
    self.tuijian.textAlignment = NSTextAlignmentCenter;

    [self.contentView addSubview:self.tuijian];
    self.smaView = [[UIView alloc]initWithFrame:CGRectMake(0, self.contentView.frame.size.height - 3, self.contentView.frame.size.width, 3)];
    self.smaView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.smaView];
}
- (void)setSelected:(BOOL)selected{
    [super setSelected:selected];
//    self.contentView.backgroundColor = selected ? [UIColor redColor] : [UIColor whiteColor];
    self.smaView.backgroundColor = selected ? [UIColor redColor] : [UIColor clearColor];
    self.tuijian.textColor = selected ? [UIColor redColor] : [UIColor blackColor];

}

@end
